#include <iostream>
using namespace std;
#include <iomanip>
using std::setw;
#include <cmath>
#include <cstring>

double add_all(char i[]);

int main()
{
	char i[1000];
	double sum_all;
	cin >> i;
	sum_all=add_all(i);
	cout << sum_all;
	return 0;
}

double add_all(char i[])
{
	double len=strlen(i);
	double sum_all=0;
	for(int j=0;j<len;j++)
	{
		sum_all=sum_all+int(i[j]-'0');
	}
	return sum_all;
}


	
